package com.bruce.starts.demo.nio;

import java.io.RandomAccessFile;
import java.nio.channels.FileChannel;
import java.util.concurrent.atomic.AtomicInteger;

public class BufferNioTest {
    public static void main(String[] args) throws Exception{
        test1();
    }
    public static void test1() throws Exception{
        //RandomAccessFile r1 = new RandomAccessFile("F:\\practice\\result.txt", "rw");
        //FileChannel f1 = r1.getChannel();
        //RandomAccessFile r2 = new RandomAccessFile("F:\\practice\\result1.txt", "rw");
        //FileChannel f2 = r2.getChannel();
        //long position = 0;
        //long count = f1.size();
        //f2.transferFrom(f1,position,count);
        AtomicInteger atomic = new AtomicInteger();
        System.out.println(atomic.incrementAndGet());
    }
}
